﻿using DapperLambdaSQL;
using DapperLambdaSQL.Factory;
using DapperLambdaSQL.Model;

namespace DapperLambdaSQLTests
{
    public class OrderDBContext : DbContext
    {
        protected override SQLOptions SQLOptions => GetSQLOptions();
        public OrderDBContext(IDbConnectionFactory connectionFactory) : base(connectionFactory)
        {
        }

        protected SQLOptions GetSQLOptions()
        {
            var sqlOptions = new SQLOptions
            {
                DbType = DbType.MySQL,
                BooleanConvertType = BooleanConvertType.Char_YN,
                DbConnectionString = "Data Source=192.168.100.211;port=3306;Initial Catalog=testdemo;user id=quantum;password=admin;Character Set=utf8;pooling=true;MaximumPoolsize=3000;",
            };
            return sqlOptions;
        }
    }
}